# 学生管理系统
def student_management_system():
    """综合运用多种数据类型的学生管理系统"""
    
    # 使用字典存储多个学生信息
    students = {
        "S001": {
            "name": "张三",
            "age": 20,
            "gender": "男",
            "courses": ["数学", "英语", "编程"],
            "scores": {"数学": 85, "英语": 90, "编程": 95}
        },
        "S002": {
            "name": "李四",
            "age": 21,
            "gender": "女",
            "courses": ["数学", "英语", "物理"],
            "scores": {"数学": 78, "英语": 82, "物理": 85}
        }
    }
    
    print("=== 学生管理系统 ===")
    
    # 遍历所有学生
    for student_id, info in students.items():
        print(f"\n学生ID: {student_id}")
        print(f"姓名: {info['name']}, 年龄: {info['age']}岁")
        print(f"课程: {', '.join(info['courses'])}")
        
        # 计算平均成绩
        total = sum(info['scores'].values())
        average = total / len(info['scores'])
        print(f"平均成绩: {average:.1f}")
        
        # 找出最高分课程
        max_course = max(info['scores'], key=info['scores'].get)
        print(f"最高分课程: {max_course} ({info['scores'][max_course]}分)")
    
    return students

# 调用函数
student_management_system()